{% extends "base.html" %}

{% block title %}舆情监管方案{% endblock %}

{% block breadcrumb %}舆情监管方案{% endblock %}

{% block content %}
<!-- 监管方案卡片 -->
<div class="plan-grid">
    <!-- 新建方案卡片 -->
    <div class="plan-card add-plan" onclick="showNewPlanModal()">
        <i class="material-icons">add_circle_outline</i>
        <span>新建监管方案</span>
    </div>

    <!-- 现有方案卡片 -->
    <div class="plan-card">
        <div class="plan-header">
            <h3>重点舆情监控</h3>
            <span class="status active">运行中</span>
        </div>
        <div class="plan-content">
            <div class="plan-stats">
                <div class="stat-item">
                    <span class="label">监控源</span>
                    <span class="value">12</span>
                </div>
                <div class="stat-item">
                    <span class="label">关键词</span>
                    <span class="value">25</span>
                </div>
                <div class="stat-item">
                    <span class="label">预警规则</span>
                    <span class="value">8</span>
                </div>
            </div>
            <div class="plan-tags">
                <span class="tag">新闻媒体</span>
                <span class="tag">社交平台</span>
                <span class="tag">论坛</span>
            </div>
        </div>
        <div class="plan-footer">
            <button class="btn-text">
                <i class="material-icons">edit</i>
                编辑
            </button>
            <button class="btn-text">
                <i class="material-icons">content_copy</i>
                复制
            </button>
            <button class="btn-text danger">
                <i class="material-icons">delete</i>
                删除
            </button>
        </div>
    </div>
</div>

<!-- 新建方案弹窗 -->
<div id="newPlanModal" class="modal">
    <div class="modal-content">
        <div class="modal-header">
            <h3>新建监管方案</h3>
            <button class="btn-icon" onclick="closeModal()">
                <i class="material-icons">close</i>
            </button>
        </div>
        <div class="modal-body">
            <div class="form-group">
                <label>方案名称</label>
                <input type="text" placeholder="输入方案名称">
            </div>
            <div class="form-group">
                <label>监控源选择</label>
                <div class="checkbox-group">
                    <label class="checkbox">
                        <input type="checkbox"> 新闻媒体
                    </label>
                    <label class="checkbox">
                        <input type="checkbox"> 社交平台
                    </label>
                    <label class="checkbox">
                        <input type="checkbox"> 论坛博客
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label>关键词设置</label>
                <div class="tag-input">
                    <div class="tags">
                        <!-- 已添加的标签 -->
                    </div>
                    <input type="text" placeholder="输入关键词后按回车添加">
                </div>
            </div>
            <div class="form-group">
                <label>预警规则</label>
                <div class="rule-builder">
                    <!-- 规则构建器 -->
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn-secondary" onclick="closeModal()">取消</button>
            <button class="btn-primary">保存</button>
        </div>
    </div>
</div>
{% endblock %}

{% block scripts %}
<script>
function showNewPlanModal() {
    document.getElementById('newPlanModal').style.display = 'block';
}

function closeModal() {
    document.getElementById('newPlanModal').style.display = 'none';
}
</script>
{% endblock %}